<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 通过构造函数 属性为 (uname，sex，age) 创建出 你们小组的所有人  用数组统计起来 通过年龄筛选小于20的同学
      function Fn(uname, sex, age) {
        this.uname = uname
        this.sex = sex
        this.age = age
      }
      const yi = new Fn(`刘萌`,`男`,'18')
      const er = new Fn(`张梦超`,`男`,'19')
      const san = new Fn(`张贝奇`,`男`,'20')
      const si = new Fn(`晁景景`,`女`,'18')
      const wu = new Fn(`贾文超`,`男`,'18')
      const liu = new Fn(`陈记均`,`男`,'18')
      let arr = [yi,er,san,si,wu,liu].filter((item) => item.age < 20)
      console.log(arr);
    </script>
  </body>
</html>
